﻿using System;
using System.Configuration;

namespace DAL
{
    internal class DataConnection
    {
        private const string ErrorFormat = "数据库连接\"{0}\"配置失败。";
        private const string TestDBConnection = "TestDB";

        public static ConnectionStringSettings TestDBSettings
        {
            get
            {
                try
                {
                    return ConfigurationManager.ConnectionStrings[TestDBConnection];
                }
                catch(Exception)
                {
                    throw new Exception(string.Format(ErrorFormat, TestDBConnection));
                }
            }
        }
    }
}
